home *** CD-ROM | disk | FTP | other *** search
- /* ParseAminetRecent.dopus5 */
- lf = '0a'x
- interesting = 'biz/dopus hard/hack util/dtype sex beer money'
-
- options results
- address 'DOPUS.1'
-
- if ~show('p','MIAMI.1') then do
- address command 'Miami:Miami'
- WaitForPort 'MIAMI.1'
- if ~show('p','MIAMI.1') then do
- dopus request '"Unable to run Miami!" OK'
- exit
- end
- end
-
- flag = 0
- address 'MIAMI.1' 'ISONLINE'
- if rc then flag = 1 /* see if Miami is already online */
- do while flag = 0
- address 'MIAMI.1' 'ONLINE'
- address 'MIAMI.1' 'ISONLINE'
- if rc then flag = 1
- end
-
- lister new
- handle = result
- lister set handle source
- 'command wait ftpconnect lister 'handle' host ftp.livewire.com.au dir /pub/aminet noscan recon'
-
- command source handle original wait 'copy name=RECENT to=RAM:'
-
- lister close handle
- command ftpquit
- if flag = 2 then address 'MIAMI.1' 'OFFLINE'
-
- if ~open('infile','RAM:RECENT','R') then do
- dopus request '"Cannot open RECENT file!" OK'
- exit
- end
-
- text = 'Found these interesting files:'
- do while ~eof('infile')
- aline = readln('infile')
- do i = 1 to words(interesting)
- if index(aline, word(interesting,i)) > 0 then do
- text = text||lf||aline
- leave
- end
- end
- end
- call close('infile')
-
- dopus request '"'text'" OK'
- exit
-